Repository navigation
[APPS-2958] Add: list each backend function's action calls in the debugBundle response - #607
Draft
tyffical wants to merge 1 commit into
Conversation
This was referenced Oct 21, 2026
🎉 All green!🧪 All tests passed 🔗 Commit SHA: eba15b2 | Docs | View more details | Give us feedback! |
tyffical
force-pushed
the
tiffany.trinh/apps-2947-debug-bundle-connection-ids
branch
from
October 23, 2026 05:20
403cc08 to
2e8c7d4
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2958-debug-bundle-action-list
branch
from
October 23, 2026 05:20
c8122aa to
19ec355
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2947-debug-bundle-connection-ids
branch
from
October 23, 2026 14:52
2e8c7d4 to
cac186d
Compare
tyffical
changed the base branch from
tiffany.trinh/apps-2947-debug-bundle-connection-ids
to
tiffany.trinh/apps-2947-connection-ids-fail-closed
October 23, 2026 14:53
tyffical
force-pushed
the
tiffany.trinh/apps-2958-debug-bundle-action-list
branch
from
October 23, 2026 14:53
19ec355 to
447c145
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2947-connection-ids-fail-closed
branch
from
October 23, 2026 15:59
e64de90 to
23be3cd
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2958-debug-bundle-action-list
branch
2 times, most recently
from
October 23, 2026 16:22
bc68d52 to
e881537
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2947-connection-ids-fail-closed
branch
4 times, most recently
from
October 26, 2026 21:17
09378a1 to
41dda46
Compare
…dle response
POST /__dd/debugBundle's JSON response gains an optional actions list:
one { fqn, connectionIds } entry per action statically called through
@datadog/action-catalog imports in the function's file and the modules
it imports, the same calls allowedConnectionIds comes from, ordered by
fqn. The dev server builds the list only for the JSON response, from the
connection-ID collector's module records and an FQN collector that reads
each action's FQN from the catalog module the bundle loaded, since the
import path alone doesn't name the action. Each bundle walks the calls
once, for both allowedConnectionIds and the list. The FQN collector
reuses an app module's parsed record and logs a module it can't read at
debug level.
The list is omitted, with a debug log, when any call's FQN is unknown.
When a function calls actions but no bundled package module maps an
export to an action FQN, the dev server warns once per middleware, since
the action-catalog build output may have changed shape.
The dev client and the frame transport forward a well-formed list with
the bundle, copied by index; a malformed list is dropped and the bundle
is still sent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tyffical
force-pushed
the
tiffany.trinh/apps-2958-debug-bundle-action-list
branch
from
October 27, 2026 05:34
e881537 to
eba15b2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Architecture
flowchart LR REQ["POST /__dd/debugBundle, Accept: application/json"] --> NB["Nested Vite build of the function"] NB --> MG["Module-graph collector: app module records"] NB --> FQ["FQN collector: catalog export to fqn"] MG --> W["Action-catalog calls, one walk"] FQ --> W W --> IDS["allowedConnectionIds"] W --> ACT["actions, grouped by fqn"] IDS --> RES["code, allowedConnectionIds, actions?"] ACT --> RES RES --> DC["Dev client"] --> T["Transport"] --> MSG["run-query bundle, validated copy"]allowedConnectionIdscovers; each FQN comes from the loaded catalog module, not the import path (143 of 3,132 exports in@datadog/action-catalog@0.0.7differ), andactionsis omitted when any call's FQN is unknown.Changes
8 changes across protocol.ts, dev-server.ts, the AST helpers, the client and tests
DebugBundleActionand optionalactionsonDebugBundleResponsepackages/plugins/apps/src/backend/protocol.tscom.datadoghq.*FQN it callspackages/plugins/apps/src/backend/ast-parsing/action-catalog-fqns.tspackages/plugins/apps/src/backend/ast-parsing/extract-connection-ids-from-module-graph.tspackages/plugins/apps/src/backend/ast-parsing/list-action-calls.tspackages/plugins/apps/src/vite/action-catalog-fqn-collector.tsactionsin the JSON responsepackages/plugins/apps/src/vite/dev-server.tsactionswith the framed bundlepackages/plugins/apps/src/backend/client/guards.ts,dev-client/dev-client.ts,post-message-transport.tshttp/httpand a two-action backend*.test.ts,packages/tests/src/_jest/fixtures/QA Instructions
e8815371is unconfirmed. Setup: Local QA without npm link.debugBundleapplication/jsonwithcode,allowedConnectionIdsandactionsdebugBundletext/plain; samecode; exactly the two FQNs listed inactionsactionscontentaws/agent'screateAgentiscom.datadoghq.aws.bedrock.agent.createAgent;deleteChatlists both Slack connectionsqa-json.txtbelowLive dev server: fixture, server script, commands and captured output
The published
@datadog/action-catalog@0.0.7, extracted intoqa-app/node_modules/@datadog/action-catalog; the vite plugin built from this branch; no auth.qa-app/backend/notify.backend.ts:qa-server.mjs:qa-json.txt(codeelided):{ "code": "<2212 chars, identical to the text/plain response>", "allowedConnectionIds": ["conn-aws", "conn-slack", "conn-slack-backup"], "actions": [ { "fqn": "com.datadoghq.aws.bedrock.agent.createAgent", "connectionIds": ["conn-aws"] }, { "fqn": "com.datadoghq.slack.chat.deleteChat", "connectionIds": ["conn-slack", "conn-slack-backup"] } ] }Blast Radius
actionsis optional on the JSONdebugBundleresponse and the framedbundle; the plain-text response, the production build andallowedConnectionIdsare unchanged.com.datadoghq.string.Out of Scope / Follow-ups
10 items deferred
$.Actionscalls@datadog/action-catalogimport calls count, as for connection IDs$.Actions.a.b(...)chains if the host page needs themallowedConnectionIdsconnectionIdbeside bound calls to its FQNcom.datadoghq.action,executeActionViaCloudbundles includedhasPackageExportFqnscan fire or stay quiet wronglyisDebugBundleto omit the unvalidatedactionsactionswithout checking it; both callers re-validate it throughcopyDebugBundleActionsOmit<DebugBundleResponse, 'actions'>functiondeclarationslet/var, they count as stable exports, so a reassigned one could map to the wrong FQN in the hintletDocumentation
DebugBundleResponseinpackages/plugins/apps/src/backend/protocol.ts.🤖 Generated with Claude Code